﻿@using Webdiyer.WebControls.Mvc;
@model PagedList<Magicodes.WeiChat.Data.Models.Site.Site_Notify>

@{
    ViewBag.Title = "站点通知";
}

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-9">
        <h2>@ViewBag.Title</h2>
        <ol class="breadcrumb">
            <li>
                <a href="/">主页</a>
            </li>
            <li class="active">
                <strong>@ViewBag.Title</strong>
            </li>
        </ol>
    </div>
</div>

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <hr style="margin:2px 2px 10px 2px;" />
                    <div class="row">
                        <div class="col-sm-3">
                            @using (Html.BeginForm("Index", @Request.RequestContext.RouteData.GetRequiredString("controller"), FormMethod.Get))
                            {
                                <div class="input-group">
                                    @Html.TextBox("q", ViewBag.q as string, new { @placeholder = "请输入关键字", @class = "input-sm form-control" })
                                    <span class="input-group-btn">
                                        <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i>&nbsp;搜索</button>
                                    </span>
                                </div>
                            }
                        </div>
                        <a class="btn btn-warning btn-sm" id="btnDelete" data-action="READ"><i class="fa fa-remove"></i>&nbsp;批量设置为已读</a>
                    </div>
                    <div>
                        <table class="table table-striped table-bordered table-hover" style="overflow-x:scroll">
                            <tr>
                                <th>
                                    <div class="checkbox checkbox-warning" style="margin-top:0;margin-bottom:0;">
                                        <input type="checkbox" id="chkCheckAll">
                                        <label for="chkCheckAll"> <strong>全选</strong> </label>
                                    </div>
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.Title)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.Message)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.HasRead)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.UpdateTime)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.CreateBy)
                                </th>
                            </tr>

                            @foreach (var item in Model)
                            {
                                <tr>
                                    <td>
                                        <div class="checkbox checkbox-info" style="margin-top:0;margin-bottom:0;">
                                            <input type="checkbox" id="cbo_@(item.Id)" name="ids" value="@(item.Id)">
                                            <label for="cbo_@(item.Id)">  </label>
                                        </div>
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.Title)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.Message)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.HasRead)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.UpdateTime)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.CreateBy)
                                    </td>
                                </tr>
                            }
                        </table>
                    </div>
                    <div class="row">
                        @Html.Partial("_BootStrapPager", Model)
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@section Styles {
    @Styles.Render("~/Content/plugins/iCheck/iCheckStyles")
}
@section Scripts {
    @Scripts.Render("~/plugins/iCheck")
    <script type="text/javascript">
        $(function () {
            mwc.bs.init({ iCheck: false, initAllTrCheck: true });
        });
    </script>
}
